#include<iostream>
using namespace std;
int t;
int main()
{
	cin >> t;
	while (t--) {
		int n;
		cin >> n;
		if ((n & (n - 1)) == 0 && n) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}